<template>
  <div>

       <mc-query ref="query" :data="list" @change="change" :click-cancel="true"></mc-query>
       <el-button @click="print">打印</el-button>
       <el-button @click="change">改变</el-button>
  </div>
</template>

<script>
import McQuery from "./components/McQuery";
export default {
    data(){
      return {
        list:[]
      }
    },
    components:{
      McQuery,
    },
  mounted(){
        setTimeout(()=>{
//          this.$nextTick(()=>{
//            this.$refs.query.set([
//              {title:"行业",name:"hy",value:null,condition:[{key:"",label:"全部",check:true},{key:"1",label:"电商"},{key:"2",label:"水产"}]},
//              {title:"状态",name:"status",value:null,condition:[{key:"",label:"全部",check:true},{key:"a",label:"正常"},{key:"b",label:"异常"}]},
//            ])

            this.list = [
              {title:"行业",name:"hy",visible:true,children:['status'],value:null,condition:[{key:"",label:"全部",check:true},{key:"1",label:"电商"},{key:"2",label:"水产"}]},
              {title:"状态",name:"status",visible:false,value:null,condition:[{key:"",label:"全部",check:true},{key:"a",label:"正常"},{key:"b",label:"异常"}]},
            ]
//          })

        },1000)
  },
    methods:{
        print(){
            console.log(this.form)
        },
        change(v){
           console.log(v)
        }
    }
}
</script>

<style>

</style>
